package com.stylefeng.guns.wx.modular.scheduled.service.impl;

import com.stylefeng.guns.wx.modular.scheduled.service.IUserNovelService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * Package: com.stylefeng.guns.wx.modular.scheduled
 * Description： TODO
 * Author: 4967677099@qq.com
 * Date: Created in 2018/3/18 0018 21:22
 * Version: 0.0.1
 * Modified By: 4967677099@qq.com
 */
@Component
public class Task {
    @Resource
    private IUserNovelService userNovelService;
    /**
     * 发送小说更新提醒 到关注人的电子邮件
     */
    @Scheduled(cron = "0 0/1 * * * ?")
    public void novelUpdateReminder(){
        userNovelService.reminder();
    }

    /**
     * 小说更新爬虫
     */
    @Scheduled(cron = "0 0/1 * * * ?")
    public void novelUpdateWebmagic(){
        userNovelService.webmagic();
    }
}
